package com.tuanzi.loan.web.lazy.settlementsystem;

import com.tuanzi.loan.business.service.settlementsystem.SettlementCompanyService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementCompanyRequest;
import com.tuanzi.loan.vo.response.settlementsystem.SettlementCompanyResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class SettlementCompanyLazyDataModel extends LazyDataSessionModel<SettlementCompanyRequest,SettlementCompanyResponse> {
    private SettlementCompanyService settlementCompanyService;
    public SettlementCompanyLazyDataModel(SettlementCompanyRequest settlementCompanyRequest, CurrentUserBean session, SettlementCompanyService settlementCompanyService) {
        super(settlementCompanyRequest, session);
        this.settlementCompanyService = settlementCompanyService;
    }
    @Override
    protected Page<SettlementCompanyResponse> doLoad0(PageSearcher<SettlementCompanyRequest> pageSearcher) {
        return settlementCompanyService.list(pageSearcher);
    }
}
